package model

import (
	"encoding/json"
	"github.com/lib/pq"
)

type FeePlanGroupCreateRequest struct {
	Id         int64   `json:"id"`
	Name       string  `json:"name"`
	Remark     string  `json:"remark"`
	EBikeIds   []int64 `json:"ebike_ids"`
	FeePlanIds []int64 `json:"fee_plan_ids"`
	Def        int     `json:"def"`
	Enable     int     `json:"enable"`
	CreatedAt  int64   `json:"created_at"`
	UpdatedAt  int64   `json:"updated_at"`
}
type FeePlanGroupUpdateRequest struct {
	Id         *int64        `json:"id"`
	Name       *string       `json:"name"`
	Remark     *string       `json:"remark"`
	EBikeIds   []int64       `json:"ebike_ids"`
	FeePlanIds pq.Int64Array `json:"fee_plan_ids"`
	Def        *int          `json:"def"`
	Enable     *int          `json:"enable"`
	CreatedAt  *int64        `json:"created_at"`
	UpdatedAt  *int64        `json:"updated_at"`
}
type FeePlanGroupListRequest struct {
	Id         *int64  `json:"id"`
	Name       *string `json:"name"`
	Remark     *string `json:"remark"`
	FeePlanId  *int64  `json:"fee_plan_id"`
	FeePlanIds []int64 `json:"fee_plan_ids"`
	Def        *int    `json:"def"`
	Enable     *int    `json:"enable"`
	CreatedAt  *int64  `json:"created_at"`
	UpdatedAt  *int64  `json:"updated_at"`
	Index      int     `json:"index"`
	Size       int     `json:"size"`
}
type FeePlanGroupListResponse struct {
	Total int                 `json:"total"`
	List  []*FeePlanGroupInfo `json:"list"`
}
type FeePlanGroupInfoRequest struct {
	Id int64 `json:"id"`
}
type FeePlanGroupInfo struct {
	Id            int64           `json:"id"`
	Name          string          `json:"name"`
	Remark        string          `json:"remark"`
	FeePlanIds    pq.Int64Array   `json:"fee_plan_ids"`
	FeePlanDetail json.RawMessage `json:"fee_plan_detail"`
	EbikeIds      []uint64        `json:"ebike_ids"`
	Def           int             `json:"def"`
	Enable        int             `json:"enable"`
	CreatedAt     int64           `json:"created_at"`
	UpdatedAt     int64           `json:"updated_at"`
}
type FeePlanGroupDeleteRequest struct {
	Id int64 `json:"id"`
}

type CheckRequest struct {
	Id         *int64        `json:"id"`
	Name       *string       `json:"name"`
	Remark     *string       `json:"remark"`
	Def        int           `json:"def"`
	EBikeIds   []int64       `json:"ebike_ids"`
	FeePlanIds pq.Int64Array `json:"fee_plan_ids"`
}
